<%--
  Created by IntelliJ IDEA.
  User: qiliping
  Date: 15/12/9
  Time: 下午5:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>代理商详情</title>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            客户管理 <small>代理商详情</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li><i class="fa fa-home"></i> <a href="${ctx}"> 首页 </a> <i
                    class="fa fa-angle-right"></i></li>
            <li><a href="${ctx}/agent"> 代理商管理 </a> <i
                    class="fa fa-angle-right"></i></li>
            <li><a href="#"> 代理商详情 </a></li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>
<!-- END PAGE HEADER-->
<!------内容区---->
<div class="main">

    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-primary">

                <div class="panel-body height410">
                    <div class="form-group">
                        <label class="control-label">代理商名称：</label>
                        <span>${agent.agentName}</span>
                    </div>
                    <div class="form-group">
                        <label class="control-label">联系人：</label>
                        <span>${agent.linkName}</span>
                    </div>
                    <div class="form-group">
                        <label class="control-label">联系电话 ：</label>
                        <span>${agent.linkPhone}</span>
                    </div>
                    <div class="form-group">
                        <label class="control-label">所在省市：</label>
                        <span>${agent.district}</span>
                    </div>
                    <div class="form-group">
                        <label class="control-label">详细地址：</label>
                        <span>${agent.address}</span>
                    </div>
                    <div class="form-group">
                        <label class="control-label pull-left">公司简介：</label>
                        <span style="margin-left: 75px;display: block;" class="trunk-fill4">
                            ${agent.intro}
                        </span>
                    </div>
                    <div class="form-group">
                        <label class="control-label pull-left">申请时间：</label>
                        <span >
                            <fmt:formatDate value="${agent.applyTime}" pattern="yyyy-MM-dd hh:mm"></fmt:formatDate>

                        </span>
                    </div>
                    <div class="form-group">
                        <label class="control-label pull-left">审核时间：</label>
                        <span >
                            <fmt:formatDate value="${agent.auditTime}" pattern="yyyy-MM-dd hh:mm"></fmt:formatDate>

                        </span>
                    </div>
                    <div class="form-group">
                        <label class="control-label pull-left">状态：</label>
                        <span >
                            <c:choose>
                                <c:when test="${agent.status == 0}">
                                    待审核
                                </c:when>
                                <c:when test="${agent.status == 1}">
                                    已通过
                                </c:when>
                                <c:when test="${agent.status == 2}">
                                    已拒绝
                                </c:when>
                                <c:when test="${agent.status == 3}">
                                    已取消
                                </c:when>
                            </c:choose>

                        </span>
                    </div>
                </div>
            </div>



                <div class="form-group">
                    <form:form  method="post" cssClass="form-horizontal">
                        <input type="hidden" name="agentId" value="${agent.agentId}" />
                        <div class="col-md-9 col-md-offset-3">
                            <c:if test="${agent.status == 0}">
                                <button type="submit" class="btn blue">审核通过</button>
                            </c:if>
                        <span class="field-validation-error">${error}</span>
                        </div>
                    </form:form>
                </div>



        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <table class="table table-striped table-hover zqy-table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>姓名</th>
                    <th>职位</th>
                    <th>申请时间</th>
                    <th>状态</th>
                    <th></th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="item" items="${salesman}">
                    <tr>
                        <td>${item.agentId}</td>
                        <td>${item.agentName}</td>
                        <td>
                            <c:choose>
                                <c:when test="${item.identity == 1}">
                                    业务员
                                </c:when>
                                <c:when test="${item.identity == 2}">
                                    团队长
                                </c:when>
                            </c:choose>
                        </td>
                        <td>
                            <fmt:formatDate value="${item.applyTime}" pattern="yyyy-MM-dd"/>
                        </td>
                        <td>
                            <c:choose>
                                <c:when test="${item.status == 0}">
                                    待审核
                                </c:when>
                                <c:when test="${item.status == 1}">
                                    已通过
                                </c:when>
                                <c:when test="${item.status == 2}">
                                    已拒绝
                                </c:when>
                                <c:when test="${item.status == 3}">
                                    已取消
                                </c:when>
                            </c:choose>

                        </td>
                        <td>

                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>

        </div>
    </div>
</div>
</body>
</html>
